package com.han.yrpc.core.registry;

import java.net.InetSocketAddress;

public interface Register {

    /**
     * 获取注册中心端口
     * @return port
     */
    int getPort();

    /**
     * 获取注册中心主机地址
     * @return host
     */
    String getHost();

    default InetSocketAddress getInetSocketAddress(){
        return new InetSocketAddress(getHost(), getPort());
    }

}
